using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class ProjectItem
{
readonly static Action<ProjectItem,object>[] _SetValues=new Action<ProjectItem,object>[]{(r,t)=>r.Caption=Reflection.ParseObject(t, r.Caption),(r,t)=>r.Code=Reflection.ParseObject(t, r.Code),(r,t)=>r.CreationTime=Reflection.ParseObject(t, r.CreationTime),(r,t)=>r.Description=Reflection.ParseObject(t, r.Description),(r,t)=>r.Hide=Reflection.ParseObject(t, r.Hide),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.Keywords=Reflection.ParseObject(t, r.Keywords),(r,t)=>r.project_id=Reflection.ParseObject(t, r.project_id),(r,t)=>r.PublishTime=Reflection.ParseObject(t, r.PublishTime),(r,t)=>r.Sequence=Reflection.ParseObject(t, r.Sequence),(r,t)=>r.SubjectTotal=Reflection.ParseObject(t, r.SubjectTotal),(r,t)=>r.user_id=Reflection.ParseObject(t, r.user_id)};
readonly static string[] _Columns=new string[]{"Caption","Code","CreationTime","Description","Hide","Id","Keywords","project_id","PublishTime","Sequence","SubjectTotal","user_id"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Caption", this.Caption);
AppendValue(action,"Code", this.Code);
AppendValue(action,"CreationTime", this.CreationTime);
AppendValue(action,"Description", this.Description);
AppendValue(action,"Hide", this.Hide);
AppendValue(action,"Id", this.Id);
AppendValue(action,"Keywords", this.Keywords);
AppendValue(action,"project_id", this.project_id);
AppendValue(action,"PublishTime", this.PublishTime);
AppendValue(action,"Sequence", this.Sequence);
AppendValue(action,"SubjectTotal", this.SubjectTotal);
AppendValue(action,"user_id", this.user_id);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[12];
cols[0]= RecordColumn.Column("Caption",this.Caption);
cols[1]= RecordColumn.Column("Code",this.Code);
cols[2]= RecordColumn.Column("CreationTime",this.CreationTime);
cols[3]= RecordColumn.Column("Description",this.Description);
cols[4]= RecordColumn.Column("Hide",this.Hide);
cols[5]= RecordColumn.Column("Id",this.Id);
cols[6]= RecordColumn.Column("Keywords",this.Keywords);
cols[7]= RecordColumn.Column("project_id",this.project_id);
cols[8]= RecordColumn.Column("PublishTime",this.PublishTime);
cols[9]= RecordColumn.Column("Sequence",this.Sequence);
cols[10]= RecordColumn.Column("SubjectTotal",this.SubjectTotal);
cols[11]= RecordColumn.Column("user_id",this.user_id);
return cols;
}

}
}

